package com.sojson.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.sojson.base.impl.BaseDaoImpl;
import com.sojson.dao.EducationExperienceDao;
import com.sojson.entity.po.EducationExperience;

/**
 * 教育经历表Dao实现类(目的:把分页插件从Service层分离,这样就不用每次调Dao接口都要分页)
 * 
 * @author liu
 * @date 2021-04-26
 */
@Repository
public class EducationExperienceDaoImpl extends BaseDaoImpl<EducationExperienceDao, EducationExperience> implements EducationExperienceDao {

    @Resource
    private EducationExperienceDao educationExperienceDao;

    /**
     * 单条插入
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int insert(EducationExperience educationExperience) {
        return educationExperienceDao.insert(educationExperience);
    }

    /**
     * 批量插入
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int insertList(List<EducationExperience> educationExperiences) {
        return educationExperienceDao.insertList(educationExperiences);
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int deleteByDto(EducationExperience educationExperience) {
        return educationExperienceDao.deleteByDto(educationExperience);
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        return educationExperienceDao.countAll();
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<EducationExperience> listAll() {
        return educationExperienceDao.listAll();
    }

    /**
     * 根据对象统计数量
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int countByDto(EducationExperience educationExperience) {
        return educationExperienceDao.countByDto(educationExperience);
    }

    /**
     * 根据对象查询
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public List<EducationExperience> listByDto(EducationExperience educationExperience) {
        startPage(educationExperience);
        return educationExperienceDao.listByDto(educationExperience);
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        return educationExperienceDao.deleteById(id);
    }

    /**
     * 通过id列表删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIdList(List<Integer> ids) {
        return educationExperienceDao.deleteByIdList(ids);
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateById(EducationExperience educationExperience) {
        return educationExperienceDao.updateById(educationExperience);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticByIdList(EducationExperience educationExperience) {
        return educationExperienceDao.updateStaticByIdList(educationExperience);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param educationExperiences
     * @return
     */
    @Override
    public int updateChangeByIdList(List<EducationExperience> educationExperiences) {
        return educationExperienceDao.updateChangeByIdList(educationExperiences);
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updatePartialById(EducationExperience educationExperience) {
        return educationExperienceDao.updatePartialById(educationExperience);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticPartialByIdList(EducationExperience educationExperience) {
        return educationExperienceDao.updateStaticPartialByIdList(educationExperience);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param educationExperiences
     * @return
     */
    @Override
    public int updateChangePartialByIdList(List<EducationExperience> educationExperiences) {
        return educationExperienceDao.updateChangePartialByIdList(educationExperiences);
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public EducationExperience findById(Integer id) {
        return educationExperienceDao.findById(id);
    }

    /**
     * 通过id列表查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<EducationExperience> findByIdList(List<Integer> ids) {
        return educationExperienceDao.findByIdList(ids);
    }

    /**
     * 通过对象查询id列表
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public List<Integer> findIdByDto(EducationExperience educationExperience) {
        startPage(educationExperience);
        return educationExperienceDao.findIdByDto(educationExperience);
    }

    /**
     * 通过userId删除(物理删除)
     * 
     * @param userId
     * @return
     */
    @Override
    public int deleteByUserId(Integer userId) {
        return educationExperienceDao.deleteByUserId(userId);
    }

    /**
     * 通过userId列表删除(物理删除)
     * 
     * @param userIds
     * @return
     */
    @Override
    public int deleteByUserIdList(List<Integer> userIds) {
        return educationExperienceDao.deleteByUserIdList(userIds);
    }

    /**
     * 通过userId更新(全部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateByUserId(EducationExperience educationExperience) {
        return educationExperienceDao.updateByUserId(educationExperience);
    }

    /**
     * 通过userId列表更新(全部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticByUserIdList(EducationExperience educationExperience) {
        return educationExperienceDao.updateStaticByUserIdList(educationExperience);
    }

    /**
     * 通过userId列表更新(全部更新)(更新内容不相同)
     * 
     * @param educationExperiences
     * @return
     */
    @Override
    public int updateChangeByUserIdList(List<EducationExperience> educationExperiences) {
        return educationExperienceDao.updateChangeByUserIdList(educationExperiences);
    }

    /**
     * 通过userId更新(局部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updatePartialByUserId(EducationExperience educationExperience) {
        return educationExperienceDao.updatePartialByUserId(educationExperience);
    }

    /**
     * 通过userId列表更新(局部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticPartialByUserIdList(EducationExperience educationExperience) {
        return educationExperienceDao.updateStaticPartialByUserIdList(educationExperience);
    }

    /**
     * 通过userId列表更新(局部更新)(更新内容不相同)
     * 
     * @param educationExperiences
     * @return
     */
    @Override
    public int updateChangePartialByUserIdList(List<EducationExperience> educationExperiences) {
        return educationExperienceDao.updateChangePartialByUserIdList(educationExperiences);
    }

    /**
     * 通过userId查询
     * 
     * @param userId
     * @return
     */
    @Override
    public EducationExperience findByUserId(Integer userId) {
        return educationExperienceDao.findByUserId(userId);
    }

    /**
     * 通过userId列表查询
     * 
     * @param userIds
     * @return
     */
    @Override
    public List<EducationExperience> findByUserIdList(List<Integer> userIds) {
        return educationExperienceDao.findByUserIdList(userIds);
    }

    /**
     * 通过对象查询userId列表
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public List<Integer> findUserIdByDto(EducationExperience educationExperience) {
        startPage(educationExperience);
        return educationExperienceDao.findUserIdByDto(educationExperience);
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public void clear() {
        educationExperienceDao.clear();
    }

}